<template lang="">
<div class="fac p1756439106 jcsb" :style="{bottom: `${menuButtonInfo().bottom}px`}">
  <div class="fac p1756439059 " @click="tap('neighbor')" style="flex-direction: column;">
    <div class="p1756439654">
      <uv-icon :color="activeIndex == 1 ? '#E60012' : '#333'" size="50rpx" name="order"></uv-icon>
    </div>
    <div style="line-height: 1;" :style="{color: activeIndex == 1 ? '#E60012' : '#333'}" class="fz30">订单</div>
  </div>
  <div class="p1756439999 ">
    <div @click="refreshTap" class="p1756439999-2 fac jcc" style="flex-direction: column;">
      <img :class="refreshStatus ? 'active' : ''" class="p1756439999-1" src="https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0903/db6c5202509030902281983.png" alt="刷新">
    </div>
    <div style="line-height: 1.3;" class="fz30 ">刷新</div>
  </div>
  <div @click="tap('neighborMine')" class="fac p1756439059" style="flex-direction: column;">
    <div class="p1756439654">
      <uv-icon :color="activeIndex == 2 ? '#E60012' : '#333'" size="50rpx" name="account"></uv-icon>
    </div>
    <div style="line-height: 1;" :style="{color: activeIndex == 2 ? '#E60012' : '#333'}" class="fz30 ">我的</div>
  </div>
</div>
</template>

<script>
import dataJsonMixin from '../mixin/dataJson.js'
export default {
  mixins: [dataJsonMixin],
  props: {
    activeIndex: {
      type: Number,
      default: 1
    },
    refreshStatus: {
      default: Boolean,
      default: false
    }
  },

  methods: {
    tap(url) {
      if (this.activeIndex == 1 && url == 'neighbor') return
      if (this.activeIndex == 2 && url == 'neighborMine') return
      this.navigationFun('/pages-neighbor/' + url)

    },
    navigationFun(pageUrl) {
      var cps = getCurrentPages();
      var delta = 0;
      for (var i = cps.length - 1; i >= 0; i--) {
        if (cps[i].route === pageUrl) {
          if (delta === 0) {
            return;
          }
          wx.navigateBack({
            delta: delta
          });
          return;
        }
        delta++;
      }
      wx.redirectTo({ url: pageUrl });

    },
    refreshTap() {
      if (!this.refreshStatus) this.$emit('refresh')
    }
  },

}
</script>

<style lang="scss" scoped>
@import '../common.scss';
@keyframes spin-smooth {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.p1756439106 {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #fff;
  padding-top: 10rpx;
  padding-bottom: 10rpx;
  box-sizing: border-box;
}

.p1756439059 {
  width: 50%;
  line-height: 1;
  height: 85rpx;
  justify-content: space-between;
}

.p1756439654 {
  height: 45rpx;
  overflow: hidden;

}

.p1756439999 {
  width: 90rpx;
  min-width: 90rpx;
  height: 90rpx;
  min-height: 90rpx;
  position: relative;
  bottom: 50rpx;
  border-radius: 50%;
  font-size: 12px;
  text-align: center;

  .p1756439999-2 {
    width: 90rpx;
    min-width: 90rpx;
    height: 90rpx;
    min-height: 90rpx;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 -1rpx 10rpx 1rpx #efefef;
  }

  .p1756439999-1 {
    width: 70rpx;
    min-width: 70rpx;
    height: 70rpx;
    min-height: 70rpx;
    border-radius: 50%;
  }

  .active {
    animation: spin-smooth 2s linear infinite;

  }
}

.p1756545778 {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  background-color: #fff;
}
</style>
